﻿

@using System.Data;
@using FileServer.Common;
@{
    Layout = null;
    Layout = "~/Views/Shared/PageTemplate.cshtml";
}

    <div id="saper-container">
        <form id="searchForm" name="searchForm" action="list" method="post">
            <div id="saper-hd"></div>
            <div id="saper-bd">
                <div class="subfiled clearfix">
                    <h2>角色管理</h2>
                </div>
                <div class="subfiled-content">
                    <div class="search-box clearfix">

                        <div class="kv-item clearfix">
                            <label>角色名称：</label>
                            <div class="kv-item-content">
                                <input type="text" id="txt_Search_Name" value="@ViewBag.Search_Name" name="txt_Search_Name" placeholder="角色名称" />
                            </div>
                        </div>

                        <a href="javascript:;" id="but_Search" name="but_Search" class="sapar-btn sapar-btn-recom query-btn">查询</a>

                    </div>


                    <!--表格开始-->
                    <div class="table">
                        <!--表格操作-->
                        <div class="table-operate ue-clear">
                            <a href="javascript:;" class="add" id="add">添加</a>
                            <a href="javascript:;" class="edit" id="edit">编辑</a>
                            <a href="javascript:;" class="del" id="del">删除</a>
                        </div>
                        <!--表格具体内容-->
                        <div class="table-box">
                            <table>
                                <thead>
                                    <tr>
                                        <th style="width:50px;"><input name="allbox" id="allbox" type="checkbox" value="" onclick="selectall()" /> 全选</th>
                                        <th>序号</th>
                                        <th>权限权重</th>
                                        <th>角色名称</th>
                                        <th>备注</th>
                                        <th>操作时间</th>
                                    </tr>
                                </thead>
                                <tbody>

                                    @{int rowcount = 0; string result = "";}
                                    @foreach (DataRow item in (ViewData["DataList"] as DataTable).Rows)
                                    {
                                        rowcount = rowcount + 1;
                                    <tr @Html.Raw(rowcount % 2 == 0 ? "style='background-color:#EFF6FA';" : "") id="tr_@rowcount" onclick="selectTr('@rowcount','15','@item["r_guid"]')">

                                            <td>
                                            <input name="checkBox" type="checkbox" id="cb_@item["r_guid"]" value="@item["r_guid"]" />
                                            </td>
                                            <td >@(rowcount + ((int)ViewBag.PageIndex - 1) * (int)ViewBag.PageSize)</td>
                                            <td >@item["r_code"]</td>
                                            <td>@item["r_name"]</td>
                                            <td >@item["r_remark"]</td>
                                          
                                            <td >@item["r_addtime"]</td>
                                        </tr>
                                    }
                                    @if (rowcount < 1)
                                    {
                                        <tr class="no-data"><td colspan="5" style="text-align:center">暂时没有数据</td></tr>
                                    }
                                </tbody>
                            </table>
                        @Html.Raw(new FileServer.Common.PageHelper().GetPageHtml((int)ViewBag.RecordCount, (int)ViewBag.PageIndex, (int)ViewBag.PageCount))
                        </div>
                    </div><!--表格结束-->
                </div>
            </div>
            <div id="saper-ft"></div>
        </form>
    </div>

@Html.Partial("ListDialog.cshtml")